3.453 \(\int \cos ^3(c+d x) (a+b \sec (c+d x)) \, dx\)

Optimal. Leaf size=54 \[ -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {b \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b x}{2} \]

[Out]

1/2*b*x+a*sin(d*x+c)/d+1/2*b*cos(d*x+c)*sin(d*x+c)/d-1/3*a*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3787, 2633, 2635, 8} \[ -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {b \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b x}{2} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Sec[c + d*x]),x]

[Out]

(b*x)/2 + (a*Sin[c + d*x])/d + (b*Cos[c + d*x]*Sin[c + d*x])/(2*d) - (a*Sin[c + d*x]^3)/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 3787

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rubi steps

\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \, dx &=a \int \cos ^3(c+d x) \, dx+b \int \cos ^2(c+d x) \, dx\\ &=\frac {b \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} b \int 1 \, dx-\frac {a \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {b x}{2}+\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x) \sin (c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 57, normalized size = 1.06 \[ -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {b (c+d x)}{2 d}+\frac {b \sin (2 (c+d x))}{4 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Sec[c + d*x]),x]

[Out]

(b*(c + d*x))/(2*d) + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d) + (b*Sin[2*(c + d*x)])/(4*d)

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 42, normalized size = 0.78 \[ \frac {3 \, b d x + {\left (2 \, a \cos \left (d x + c\right )^{2} + 3 \, b \cos \left (d x + c\right ) + 4 \, a\right )} \sin \left (d x + c\right )}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/6*(3*b*d*x + (2*a*cos(d*x + c)^2 + 3*b*cos(d*x + c) + 4*a)*sin(d*x + c))/d

________________________________________________________________________________________

giac [B]  time = 0.15, size = 98, normalized size = 1.81 \[ \frac {3 \, {\left (d x + c\right )} b + \frac {2 \, {\left (6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

1/6*(3*(d*x + c)*b + 2*(6*a*tan(1/2*d*x + 1/2*c)^5 - 3*b*tan(1/2*d*x + 1/2*c)^5 + 4*a*tan(1/2*d*x + 1/2*c)^3 +
 6*a*tan(1/2*d*x + 1/2*c) + 3*b*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d

________________________________________________________________________________________

maple [A]  time = 1.00, size = 49, normalized size = 0.91 \[ \frac {\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*sec(d*x+c)),x)

[Out]

1/d*(1/3*a*(2+cos(d*x+c)^2)*sin(d*x+c)+b*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c))

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 46, normalized size = 0.85 \[ -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} b}{12 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*a - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*b)/d

________________________________________________________________________________________

mupad [B]  time = 0.83, size = 55, normalized size = 1.02 \[ \frac {b\,x}{2}+\frac {2\,a\,\sin \left (c+d\,x\right )}{3\,d}+\frac {b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}+\frac {a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3*(a + b/cos(c + d*x)),x)

[Out]

(b*x)/2 + (2*a*sin(c + d*x))/(3*d) + (b*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*cos(c + d*x)^2*sin(c + d*x))/(3*
d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*sec(d*x+c)),x)

[Out]

Integral((a + b*sec(c + d*x))*cos(c + d*x)**3, x)

________________________________________________________________________________________